package com.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lc
 * @since 2022/5/31
 */
@RestController
@RequestMapping("test")
public class TestController {

    @GetMapping("1")
    public String test1() {
        return "Test 1";
    }

    @GetMapping("2")
    public String test2() {
        throw new RuntimeException("异常错误");

        //return "Test 1";
    }
}
